<?php

$controller = isset($_GET['c']) ? $_GET['c'] : 'Index';
$method = isset($_GET['m']) ? $_GET['m'] : 'index';
$group = isset($_GET['g']) ? $_GET['g'] : 'Front';

function auto($className)
{
    //print_r($className);
    $className = str_replace('\\', '/', $className);
    $path = $className . 'php';
    if (file_exists($path)) {
        include_once $path;
    }
//     include_one 'Controller'.$className.'.php';
}

spl_autoload_register('auto');

$allClassName = '\Controller\\' . $group . '\\' . $controller;

$xxx = new $allClassName;
$xxx->$method();

